using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class OfflineOrdersExtend
{
		public static ResponseOfflineOrdersDto ToResponseDto(this OfflineOrders entity)
{			return new ResponseOfflineOrdersDto
			{
				id = entity.OoId,
				accountId = entity.OoAccountId,
				status = entity.OoStatus,
				payCount = entity.OoPayCount,
				discountId = entity.OdDiscountId,
				deductionId = entity.OdDeductionId,
				createAt = entity.OoCreateAt,
				createAtStr =Tools.TimeToString(entity.OoCreateAt),
				updateAt = entity.OoUpdateAt,
				updateAtStr =Tools.TimeToString(entity.OoUpdateAt),
			};
		}
	}
}
